﻿@model EditPostModel
@using LastoRevival.Service.Contracts.Models;


@{ ViewBag.Title = LanguageLoader.GetWord("EditPostTitle"); }
@{ 
	this.AddIndexBreadCrumb();
	this.AddForumBreadCrumb(Model.ForumID);
	this.AddCurrentBreadCrumb(LanguageLoader.GetWord("EditPostTitle"));
}

<script type="text/javascript">

	$(function ()
	{
		$("#post-message").click(submitPost);
		$("#preview").click(previewPost);
	});

	function submitPost()
	{
		$("#edit-post").submit();
	}
	
	function previewPost()
	{
		alert("preview");
	}
	
</script>
	
@Html.ValidationSummary()
<form id="edit-post" action="@Url.Action("Edit", "Post")" method="post">
@using (Html.BeginForm("Edit", "Post", FormMethod.Post))
{
	<div class="postform">
	

		<input type="hidden" name="PostID" id ="PostID" value="@Model.PostID" />

		@Html.Partial("PostForm", Model)
		
		<span id="buttons">
			<button id="post-message" type="button">@LanguageLoader.GetWord("SubmitEditButtonLabel")</button>
			<button id="preview" type="button">@LanguageLoader.GetWord("PreviewButtonLabel")</button>
			<button id="reset" type="reset">@LanguageLoader.GetWord("ResetButtonLabel")</button>
		</span>
	</div>
}
